<?php

namespace app\common\validate;

use app\common\storage\Login as storage;

class Login extends Base
{
	/**
     * 验证规则
     */
    protected $rule = [
    	'login' => 'isLogin'
    ];
    /**
     * 提示消息
     */
    protected $message = [
    	'login.isLogin' => '您尚未登陆'
    ];
    /**
     * 验证场景
     */
    protected $scene = [

    ];

    protected function isLogin($value, $rule, $data = []) {
        return $value && loader()->loadAny('storage', 'Login')->isLogin();
    }
}